package com.sunyard.layoutit.application;

import org.restlet.Application;
import org.restlet.Restlet;
import org.restlet.resource.Directory;

import com.sunyard.layoutit.common.ApplicationConfig;

public class StaticResourceApplication extends Application {

	public StaticResourceApplication() {
        setName("静态资源Application");
//        component.getClients().add(Protocol.FILE);
//        this.getConnectorService().getClientProtocols().add(Protocol.FILE);
    }

	public Restlet createInboundRoot() {
        Directory dir = new Directory(getContext(),ApplicationConfig.getResourcesReference());
		dir.setListingAllowed(true);
        dir.setDeeplyAccessible(true);
        dir.setNegotiatingContent(true);
        return dir;
    }
}
